#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int m = 0; int i = 0;
	scanf("%d", &m);
	int num = 0;
	for (i = 0; i < 5; i++)
	{
		num += m;
		m = m * 10+m;
	}
	printf("%d ", num);
	return 0;
}